// SEE END OF FILE FOR LICENSE TERMS

#include "defines.h"

#ifndef TELEMETRY_MANAGER_H
#define TELEMETRY_MANAGER_H

extern void requestFastTelemetrySend(void);
extern void requestSlowTelemetrySend(void);

#define CANB_MAX_DATA_SIZE	8

// A collection of all elements required for telemetry

typedef struct tagTELEMETRY_DATA
{
	unsigned int 	arrayOffset;
	unsigned int	byteSize;
	unsigned int 	identifier;
	unsigned char	priority;
	unsigned char	arraySize;
	unsigned int*	pData;
} TELEMETRY_DATA;


// An ID_NULL terminated list of identifiers to send for telemetry
typedef unsigned char TELEMETRY_LIST[];	

extern TELEMETRY_LIST FastTelemetryList;
extern TELEMETRY_LIST SlowTelemetryList;


// Get the next telemetry data
// return true if data is filled, return false if finished
boolean get_next_telemetry_data(TELEMETRY_DATA* pteleData);

#endif

/****************************************************************************/
// This is part of the servo and radio interface software
//
// ServoInterface source code
//	http://code.google.com/p/rc-servo-interface
//
// Copyright 2010 ServoInterface Team
// See the AUTHORS.TXT file for a list of authors of ServoInterface.
//
// ServoInterface is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ServoInterface is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License 
// along with ServoInterface.  If not, see <http://www.gnu.org/licenses/>.
//
// Many parts of ServoInterface use either modified or unmodified code
// from the MatrixPilot pilot project.
// The project also contains code for modifying MatrixPilot to operate
// with ServoInterface.
// For details, credits and licenses of MatrixPilot see the AUTHORS.TXT file.
// or see this website: http://code.google.com/p/gentlenav
/****************************************************************************/
